package com.sparrow.rpc.manager;

import com.sparrow.rpc.domain.RpcNode;
import com.sparrow.rpc.socket.msg.req.RpcLoginRequest;
import com.sparrow.rpc.socket.msg.resp.RpcLoginResponse;
import com.sparrow.rpc.socket.session.RpcSession;

public interface RpcNodeManager {
    RpcNode registerNode(String id, String ip, int port);

    RpcNode getNode(String id);

    RpcNode getSelf();

    void onRpcNodeLogin(RpcSession session, RpcLoginRequest nodeRequest);

    void onRpcNodeLoginResp(RpcSession session, RpcLoginResponse response);
}
